﻿using System;

namespace SStuff.FlowControls
{
    /// <summary>
    /// Keyboard direction accepted for selection navigation
    /// </summary>
    [Flags]
    public enum KeyboardDirection
    {
        None = 0x0,
        LeftRight = 0x1,
        UpDown=0x2,
        Both = 0x3
    }

    /// <summary>
    /// Provides methods for the KeyboardDirection enum
    /// </summary>
    public static class KeyboardDirectionExtensions
    {
        public static bool Contains(this KeyboardDirection direction, KeyboardDirection toContain)
        {
            return (direction & toContain) == toContain;
        }
    }
}
